from django.conf import settings
from django.contrib import admin
from django.urls import path, include
from django.views.static import serve
from drf_spectacular.views import SpectacularSwaggerView, SpectacularRedocView, SpectacularYAMLAPIView 

# 后续删除
# from rest_framework.documentation import include_docs_urls

urlpatterns = [
    path('admin/', admin.site.urls),
    path('media/<path:path>/', serve, {'document_root': settings.MEDIA_ROOT}),
    path('api/v1/', include('apps.urls')),
    path("media/<path:path>", serve, {"document_root":settings.MEDIA_ROOT }),
    path("api/schema/", SpectacularYAMLAPIView.as_view(), name="schema"),
    path("api-ui/", SpectacularSwaggerView.as_view(url_name="schema"), name="swagger-ui"),
    path("api-doc/", SpectacularRedocView.as_view(url_name="schema"), name="redoc"),
]
